from configparser import ConfigParser
import logging
from InfoGetter import tools


# logging.basicConfig(level=logging.INFO, filename='logs/info.log')


class NBA:
    def __init__(self, conf_path):
        cfg = ConfigParser()
        cfg.read(conf_path, encoding='utf-8')
        self.cfg = cfg
        self.log = tools.Logger('logs/infos.log', level='debug')

    def database_init(self, conn, cur):
        """
        初始化数据库表格
        :param conn:
        :param cur:
        :return:
        """


        pass


    def get_data(self, conn, cur):
        """
        获取对应数据并进行存库操作
        :param conn:
        :param cur:
        :return:
        """

        pass

    def run(self):
        # 获取数据库连接
        # conn, cur = database_init.get_conn(self.cfg)

        # 数据库初始化
        # self.database_init(conn, cur)

        # 获取数据
        # self.get_data(conn, cur)
        pass


if __name__ == '__main__':
    NBA('conf/conf.ini').run()







